class VoiceChatTagEntity {
  int id;
  int createTime;
  int updateTime;
  int valid;
  String tagName;
  int tagSort;
  String appId;
  int tagLevel;
  int parentId;
  String tagCode;
  List<VoiceChatTagEntity> children;

  VoiceChatTagEntity(
      {this.id,
        this.createTime,
        this.updateTime,
        this.valid,
        this.tagName,
        this.tagSort,
        this.appId,
        this.tagLevel,
        this.parentId,
        this.tagCode,
        this.children});

  VoiceChatTagEntity.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    createTime = json['createTime'];
    updateTime = json['updateTime'];
    valid = json['valid'];
    tagName = json['tagName'];
    tagSort = json['tagSort'];
    appId = json['appId'];
    tagLevel = json['tagLevel'];
    parentId = json['parentId'];
    tagCode = json['tagCode'];
    if (json['children'] != null) {
      children = new List<VoiceChatTagEntity>();
      json['children'].forEach((v) {
        children.add(new VoiceChatTagEntity.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['createTime'] = this.createTime;
    data['updateTime'] = this.updateTime;
    data['valid'] = this.valid;
    data['tagName'] = this.tagName;
    data['tagSort'] = this.tagSort;
    data['appId'] = this.appId;
    data['tagLevel'] = this.tagLevel;
    data['parentId'] = this.parentId;
    data['tagCode'] = this.tagCode;
    if (this.children != null) {
      data['children'] = this.children.map((v) => v.toJson()).toList();
    }
    return data;
  }
}

